<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>遍历用户页面</title>
    <style type="text/css">
        table {border-collapse: collapse; font-size: 14px; width: 80%; margin: auto}
        table, th, td {border: 1px solid darkslategray;padding: 10px}
    </style>
</head>
<body>
    <div style="text-align: center">
        <span style="color: darkslategray; font-size: 30px">欢迎光临！</span>

        <hr/>
        <table class="list">
            <tr>
                <th>id</th>
                <th>姓名</th>
                <th>密码</th>
                <th>性别</th>
                <th>生日</th>
                <th>操作</th>
            </tr>
            <tr th:each="user : ${list}">
                <td th:text="${user.id}"></td>
                <td th:text="${user.nam}"></td>
                <td th:text="${user.pwd}"></td>
                <td th:text="${user.sex==1}?'男':'女'"></td>
                <td th:text="${#dates.format(user.birth,'yyyy-MM-dd')}"></td>
                <td><a th:href="@{/users/delete(id=${user.id})}">删除</a>
                    <a th:href="@{/users/findById(id=${user.id})}">修改</a>
                </td>
            </tr>
        </table>

    </div>
<script>

</script>
</body>
</html>